
#ifndef UPDATE_DOWNLOAD_TASK_THREAD_H
#define UPDATE_DOWNLOAD_TASK_THREAD_H

#include <QThread>

class DownloadTaskThread : public QThread
{
Q_OBJECT
public:
    static DownloadTaskThread & instance();
    ~DownloadTaskThread() override;
    void run() override;
    void stop();
    void setTask(const QStringList &task);
    // 下载完毕，修改可下载状态
    void downFinished();

signals:
    void sig_download(const QString &str);

protected:
    explicit DownloadTaskThread(QObject *parent = nullptr);

private:
    QStringList task_list_;
    bool down_finish_{true};
    bool is_stop_{false};
};

#endif //UPDATE_DOWNLOAD_TASK_THREAD_H
